home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / FSM.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  42.2 KB  |  1,169 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        FSM.h
  3.  
  4.      Contains:    HFS External File System Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 9
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __FSM__
  18. #define __FSM__
  19.  
  20. #ifndef __FILES__
  21.     #include <Files.h>
  22. #endif
  23.  
  24. #ifndef __HFSVOLUMES__
  25.     #include <HFSVolumes.h>
  26. #endif
  27.  
  28. #ifndef __PROCESSES__
  29.     #include <Processes.h>
  30. #endif
  31.  
  32. #ifndef __MACERRORS__
  33.     #include <MacErrors.h>
  34. #endif
  35.  
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. /* VolMount declarations are now in Files.* */
  60.  
  61. /*
  62.  * Miscellaneous file system values not in Files.*
  63.  */
  64. enum {
  65.     fsUsrCNID                    = 16,                            /* First assignable directory or file number */
  66.                                                                 /*    File system trap word attribute bits */
  67.     kHFSBit                        = 9,                            /* HFS call: bit 9 */
  68.     kHFSMask                    = 0x0200,
  69.     kAsyncBit                    = 10,                            /* Asynchronous call: bit 10 */
  70.     kAsyncMask                    = 0x0400
  71. };
  72.  
  73.  
  74. /*
  75.  * HFSCIProc selectCode values
  76.  * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  77.  * may be set in these selectCode values.
  78.  */
  79. enum {
  80.     kFSMOpen                    = 0xA000,
  81.     kFSMClose                    = 0xA001,
  82.     kFSMRead                    = 0xA002,
  83.     kFSMWrite                    = 0xA003,
  84.     kFSMGetVolInfo                = 0xA007,
  85.     kFSMCreate                    = 0xA008,
  86.     kFSMDelete                    = 0xA009,
  87.     kFSMOpenRF                    = 0xA00A,
  88.     kFSMRename                    = 0xA00B,
  89.     kFSMGetFileInfo                = 0xA00C,
  90.     kFSMSetFileInfo                = 0xA00D,
  91.     kFSMUnmountVol                = 0xA00E,
  92.     kFSMMountVol                = 0xA00F,
  93.     kFSMAllocate                = 0xA010,
  94.     kFSMGetEOF                    = 0xA011,
  95.     kFSMSetEOF                    = 0xA012,
  96.     kFSMFlushVol                = 0xA013,
  97.     kFSMGetVol                    = 0xA014,
  98.     kFSMSetVol                    = 0xA015,
  99.     kFSMEject                    = 0xA017,
  100.     kFSMGetFPos                    = 0xA018,
  101.     kFSMOffline                    = 0xA035,
  102.     kFSMSetFilLock                = 0xA041,
  103.     kFSMRstFilLock                = 0xA042,
  104.     kFSMSetFilType                = 0xA043,
  105.     kFSMSetFPos                    = 0xA044,
  106.     kFSMFlushFile                = 0xA045,                        /*    The File System HFSDispatch selectCodes */
  107.     kFSMOpenWD                    = 0x0001,
  108.     kFSMCloseWD                    = 0x0002,
  109.     kFSMCatMove                    = 0x0005,
  110.     kFSMDirCreate                = 0x0006,
  111.     kFSMGetWDInfo                = 0x0007,
  112.     kFSMGetFCBInfo                = 0x0008,
  113.     kFSMGetCatInfo                = 0x0009,
  114.     kFSMSetCatInfo                = 0x000A,
  115.     kFSMSetVolInfo                = 0x000B,
  116.     kFSMLockRng                    = 0x0010,
  117.     kFSMUnlockRng                = 0x0011,
  118.     kFSMXGetVolInfo                = 0x0012,
  119.     kFSMCreateFileIDRef            = 0x0014,
  120.     kFSMDeleteFileIDRef            = 0x0015,
  121.     kFSMResolveFileIDRef        = 0x0016,
  122.     kFSMExchangeFiles            = 0x0017,
  123.     kFSMCatSearch                = 0x0018,
  124.     kFSMOpenDF                    = 0x001A,
  125.     kFSMMakeFSSpec                = 0x001B,                        /*    The Desktop Manager HFSDispatch selectCodes */
  126.     kFSMDTGetPath                = 0x0020,
  127.     kFSMDTCloseDown                = 0x0021,
  128.     kFSMDTAddIcon                = 0x0022,
  129.     kFSMDTGetIcon                = 0x0023,
  130.     kFSMDTGetIconInfo            = 0x0024,
  131.     kFSMDTAddAPPL                = 0x0025,
  132.     kFSMDTRemoveAPPL            = 0x0026,
  133.     kFSMDTGetAPPL                = 0x0027,
  134.     kFSMDTSetComment            = 0x0028,
  135.     kFSMDTRemoveComment            = 0x0029,
  136.     kFSMDTGetComment            = 0x002A,
  137.     kFSMDTFlush                    = 0x002B,
  138.     kFSMDTReset                    = 0x002C,
  139.     kFSMDTGetInfo                = 0x002D,
  140.     kFSMDTOpenInform            = 0x002E,
  141.     kFSMDTDelete                = 0x002F,                        /*    The AppleShare HFSDispatch selectCodes */
  142.     kFSMGetVolParms                = 0x0030,
  143.     kFSMGetLogInInfo            = 0x0031,
  144.     kFSMGetDirAccess            = 0x0032,
  145.     kFSMSetDirAccess            = 0x0033,
  146.     kFSMMapID                    = 0x0034,
  147.     kFSMMapName                    = 0x0035,
  148.     kFSMCopyFile                = 0x0036,
  149.     kFSMMoveRename                = 0x0037,
  150.     kFSMOpenDeny                = 0x0038,
  151.     kFSMOpenRFDeny                = 0x0039,
  152.     kFSMGetXCatInfo                = 0x003A,
  153.     kFSMGetVolMountInfoSize        = 0x003F,
  154.     kFSMGetVolMountInfo            = 0x0040,
  155.     kFSMVolumeMount                = 0x0041,
  156.     kFSMShare                    = 0x0042,
  157.     kFSMUnShare                    = 0x0043,
  158.     kFSMGetUGEntry                = 0x0044,
  159.     kFSMGetForeignPrivs            = 0x0060,
  160.     kFSMSetForeignPrivs            = 0x0061,                        /* The HFSPlus    API SelectCodes    */
  161.     kFSMGetVolumeInfo            = 0x001D,
  162.     kFSMSetVolumeInfo            = 0x001E,
  163.     kFSMReadFork                = 0x0051,
  164.     kFSMWriteFork                = 0x0052,
  165.     kFSMGetForkPosition            = 0x0053,
  166.     kFSMSetForkPosition            = 0x0054,
  167.     kFSMGetForkSize                = 0x0055,
  168.     kFSMSetForkSize                = 0x0056,
  169.     kFSMAllocateFork            = 0x0057,
  170.     kFSMFlushFork                = 0x0058,
  171.     kFSMCloseFork                = 0x0059,
  172.     kFSMGetForkCBInfo            = 0x005A,
  173.     kFSMCloseIterator            = 0x005B,
  174.     kFSMGetCatalogInfoBulk        = 0x005C,
  175.     kFSMCatalogSearch            = 0x005D,
  176.     kFSMMakeFSRef                = 0x006E,
  177.     kFSMCreateFileUnicode        = 0x0070,
  178.     kFSMCreateDirUnicode        = 0x0071,
  179.     kFSMDeleteObject            = 0x0072,
  180.     kFSMMoveObject                = 0x0073,
  181.     kFSMRenameUnicode            = 0x0074,
  182.     kFSMExchangeObjects            = 0x0075,
  183.     kFSMGetCatalogInfo            = 0x0076,
  184.     kFSMSetCatalogInfo            = 0x0077,
  185.     kFSMOpenIterator            = 0x0078,
  186.     kFSMOpenFork                = 0x0079,
  187.     kFSMMakeFSRefUnicode        = 0x007A,
  188.     kFSMCompareFSRefs            = 0x007C,
  189.     kFSMCreateFork                = 0x007D,
  190.     kFSMDeleteFork                = 0x007E,
  191.     kFSMIterateForks            = 0x007F
  192. };
  193.  
  194. /*
  195.  * UTDetermineVol status values
  196.  */
  197. enum {
  198.     dtmvError                    = 0,                            /* param error */
  199.     dtmvFullPathame                = 1,                            /* determined by full pathname */
  200.     dtmvVRefNum                    = 2,                            /* determined by volume refNum */
  201.     dtmvWDRefNum                = 3,                            /* determined by working directory refNum */
  202.     dtmvDriveNum                = 4,                            /* determined by drive number */
  203.     dtmvDefault                    = 5                                /* determined by default volume */
  204. };
  205.  
  206.  
  207. /*
  208.  * UTGetBlock options
  209.  */
  210. enum {
  211.     gbDefault                    = 0,                            /* default value - read if not found */
  212.                                                                 /*    bits and masks */
  213.     gbReadBit                    = 0,                            /* read block from disk (forced read) */
  214.     gbReadMask                    = 0x0001,
  215.     gbExistBit                    = 1,                            /* get existing cache block */
  216.     gbExistMask                    = 0x0002,
  217.     gbNoReadBit                    = 2,                            /* don't read block from disk if not found in cache */
  218.     gbNoReadMask                = 0x0004,
  219.     gbReleaseBit                = 3,                            /* release block immediately after GetBlock */
  220.     gbReleaseMask                = 0x0008
  221. };
  222.  
  223.  
  224. /*
  225.  * UTReleaseBlock options
  226.  */
  227. enum {
  228.     rbDefault                    = 0,                            /* default value - just mark the buffer not in-use */
  229.                                                                 /*    bits and masks */
  230.     rbWriteBit                    = 0,                            /* force write buffer to disk */
  231.     rbWriteMask                    = 0x0001,
  232.     rbTrashBit                    = 1,                            /* trash buffer contents after release */
  233.     rbTrashMask                    = 0x0002,
  234.     rbDirtyBit                    = 2,                            /* mark buffer dirty */
  235.     rbDirtyMask                    = 0x0004,
  236.     rbFreeBit                    = 3,                            /* free the buffer (save in the hash) */
  237.     rbFreeMask                    = 0x000A                        /* rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache; on >= System 7.0, rbfreeMask overrides rbTrash */
  238. };
  239.  
  240.  
  241. /*
  242.  * UTFlushCache options
  243.  */
  244. enum {
  245.     fcDefault                    = 0,                            /* default value - pass this fcOption to just flush any dirty buffers */
  246.                                                                 /*    bits and masks */
  247.     fcTrashBit                    = 0,                            /* (don't pass this as fcOption, use only for testing bit) */
  248.     fcTrashMask                    = 0x0001,                        /* pass this fcOption value to flush and trash cache blocks */
  249.     fcFreeBit                    = 1,                            /* (don't pass this as fcOption, use only for testing bit) */
  250.     fcFreeMask                    = 0x0003                        /* pass this fcOption to flush and free cache blocks (Note: both fcTrash and fcFree bits are set) */
  251. };
  252.  
  253.  
  254. /*
  255.  * UTCacheReadIP and UTCacheWriteIP cacheOption bits and masks are the ioPosMode
  256.  * bits and masks in Files.x
  257.  */
  258.  
  259. /*
  260.  * Cache routine internal error codes
  261.  */
  262. enum {
  263.     chNoBuf                        = 1,                            /* no free cache buffers (all in use) */
  264.     chInUse                        = 2,                            /* requested block in use */
  265.     chnotfound                    = 3,                            /* requested block not found */
  266.     chNotInUse                    = 4                                /* block being released was not in use */
  267. };
  268.  
  269.  
  270. /*
  271.  * FCBRec.fcbFlags bits
  272.  */
  273. enum {
  274.     fcbWriteBit                    = 0,                            /* Data can be written to this file */
  275.     fcbWriteMask                = 0x01,
  276.     fcbResourceBit                = 1,                            /* This file is a resource fork */
  277.     fcbResourceMask                = 0x02,
  278.     fcbWriteLockedBit            = 2,                            /* File has a locked byte range */
  279.     fcbWriteLockedMask            = 0x04,
  280.     fcbLargeFileBit                = 3,                            /* File may grow beyond 2GB; cache uses file blocks, not bytes */
  281.     fcbLargeFileMask            = 0x08,
  282.     fcbSharedWriteBit            = 4,                            /* File is open for shared write access */
  283.     fcbSharedWriteMask            = 0x10,
  284.     fcbFileLockedBit            = 5,                            /* File is locked (write-protected) */
  285.     fcbFileLockedMask            = 0x20,
  286.     fcbOwnClumpBit                = 6,                            /* File has clump size specified in FCB */
  287.     fcbOwnClumpMask                = 0x40,
  288.     fcbModifiedBit                = 7,                            /* File has changed since it was last flushed */
  289.     fcbModifiedMask                = 0x80
  290. };
  291.  
  292.  
  293. /*
  294.  *    ForkControlBlock.moreFlags bits
  295.  */
  296. enum {
  297.     fcbIteratorBit                = 0,                            /* FCB belongs to an FSIterator */
  298.     fcbIteratorMask                = 0x0001,
  299.     fcbUseForkIDBit                = 1,                            /* Use the FCB's forkID instead of fcbResourceBit */
  300.     fcbUseForkIDMask            = 0x0002
  301. };
  302.  
  303.  
  304. /*
  305.  *    HFS Component Interface constants
  306.  */
  307.  
  308. /*
  309.  * compInterfMask bits specific to HFS component
  310.  */
  311. enum {
  312.     hfsCIDoesHFSBit                = 23,                            /* set if file system supports HFS calls */
  313.     hfsCIDoesHFSMask            = 0x00800000,
  314.     hfsCIDoesAppleShareBit        = 22,                            /* set if AppleShare calls supported */
  315.     hfsCIDoesAppleShareMask        = 0x00400000,
  316.     hfsCIDoesDeskTopBit            = 21,                            /* set if Desktop Database calls supported */
  317.     hfsCIDoesDeskTopMask        = 0x00200000,
  318.     hfsCIDoesDynamicLoadBit        = 20,                            /* set if dynamically loading code resource */
  319.     hfsCIDoesDynamicLoadMask    = 0x00100000,                    /*        supported */
  320.     hfsCIResourceLoadedBit        = 19,                            /* set if code resource already loaded */
  321.     hfsCIResourceLoadedMask        = 0x00080000,
  322.     hfsCIHasHLL2PProcBit        = 18,                            /* set if FFS' log2PhyProc */
  323.     hfsCIHasHLL2PProcMask        = 0x00040000,                    /* is written in a high level language. (i.e., uses Pascal calling convention) */
  324.     hfsCIWantsDTSupportBit        = 17,                            /* set if FFS wants the Mac OS's Desktop Manager code to handle */
  325.     hfsCIWantsDTSupportMask        = 0x00020000                    /* all Desktop Manager requests to its volumes. */
  326. };
  327.  
  328.  
  329. /*
  330.  *    Disk Initialization Component Interface constants
  331.  */
  332.  
  333. /*
  334.  * compInterfMask bits specific to Disk Initialization component
  335.  */
  336. enum {
  337.     diCIHasExtFormatParamsBit    = 18,                            /* set if file system needs extended format */
  338.     diCIHasExtFormatParamsMask    = 0x00040000,                    /*        parameters */
  339.     diCIHasMultiVolTypesBit        = 17,                            /* set if file system supports more than one */
  340.     diCIHasMultiVolTypesMask    = 0x00020000,                    /*        volume type */
  341.     diCIDoesSparingBit            = 16,                            /* set if file system supports disk sparing */
  342.     diCIDoesSparingMask            = 0x00010000,
  343.     diCILiveBit                    = 0,                            /* set if file system is candidate for current */
  344.     diCILiveMask                = 0x00000001                    /*        formatting operation (set by PACK2) */
  345. };
  346.  
  347.  
  348. /*
  349.  * Disk Initialization Component Function selectors
  350.  */
  351. enum {
  352.     diCILoad                    = 1,                            /* Make initialization code memory resident */
  353.     diCIUnload                    = 2,                            /* Make initialization code purgeable */
  354.     diCIEvaluateSizeChoices        = 3,                            /* Evaluate size choices */
  355.     diCIExtendedZero            = 4,                            /* Write an empty volume directory */
  356.     diCIValidateVolName            = 5,                            /* Validate volume name */
  357.     diCIGetVolTypeInfo            = 6,                            /* get volume type info */
  358.     diCIGetFormatString            = 7,                            /* get dialog format string */
  359.     diCIGetExtFormatParams        = 8,                            /* get extended format parameters */
  360.     diCIGetDefectList            = 9                                /* return the defect list for the indicated disk - reserved for future use */
  361. };
  362.  
  363.  
  364. /*
  365.  * Constants used in the DICIEvaluateSizeRec and FormatListRec
  366.  */
  367. enum {
  368.     diCIFmtListMax                = 8,                            /* maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries */
  369.                                                                 /*    bits in FormatListRec.formatFlags: */
  370.     diCIFmtFlagsValidBit        = 7,                            /* set if sec, side, tracks valid */
  371.     diCIFmtFlagsValidMask        = 0x80,
  372.     diCIFmtFlagsCurrentBit        = 6,                            /* set if current disk has this fmt */
  373.     diCIFmtFlagsCurrentMask        = 0x40,                            /*    bits in FormatListRec.sizeListFlags: */
  374.     diCISizeListOKBit            = 15,                            /* set if this disk size usable */
  375.     diCISizeListOKMask            = 0x8000
  376. };
  377.  
  378.  
  379. /*
  380.  * DICIGetFormatStringRec.stringKind format strings
  381.  */
  382. enum {
  383.     diCIAlternateFormatStr        = 1,                            /* get alternate format  string (Balloon Help) */
  384.     diCISizePresentationStr        = 2                                /* get size presentation string (for dialog) */
  385. };
  386.  
  387.  
  388. /*
  389.  * Error codes returned by Disk Sparing
  390.  */
  391. enum {
  392.     diCIUserCancelErr            = 1,                            /* user cancelled the disk init */
  393.     diCICriticalSectorBadErr    = 20,                            /* critical sectors are bad (hopeless)    */
  394.     diCISparingFailedErr        = 21,                            /* disk cannot be spared */
  395.     diCITooManyBadSectorsErr    = 22,                            /* too many bad sectors */
  396.     diCIUnknownVolTypeErr        = 23,                            /* the volume type passed in diCIExtendedZero paramBlock is not supported */
  397.     diCIVolSizeMismatchErr        = 24,                            /* specified volume size doesn't match with formatted disk size */
  398.     diCIUnknownDICallErr        = 25,                            /* bogus DI function call selector */
  399.     diCINoSparingErr            = 26,                            /* disk is bad but the target FS doesn't do disk sparing */
  400.     diCINoExtendInfoErr            = 27,                            /* missing file system specific extra parameter in diCIExtendedZero call */
  401.     diCINoMessageTextErr        = 28                            /* missing message text in DIReformat call */
  402. };
  403.  
  404.  
  405. /*
  406.  *    File System Manager constants
  407.  */
  408.  
  409. /*
  410.  * Miscellaneous constants used by FSM
  411.  */
  412. enum {
  413.     fsdVersion1                    = 1,                            /* current version of FSD record */
  414.     fsmIgnoreFSID                = 0xFFFE,                        /* this FSID should be ignored by the driver */
  415.     fsmGenericFSID                = 0xFFFF                        /* unknown foreign file system ID */
  416. };
  417.  
  418.  
  419. /*
  420.  * compInterfMask bits common to all FSM components
  421.  */
  422. enum {
  423.     fsmComponentEnableBit        = 31,                            /* set if FSM component interface is enabled */
  424.     fsmComponentEnableMask        = (long)0x80000000,
  425.     fsmComponentBusyBit            = 30,                            /* set if FSM component interface is busy */
  426.     fsmComponentBusyMask        = 0x40000000
  427. };
  428.  
  429.  
  430. /*
  431.  * Selectors for GetFSInfo
  432.  */
  433. enum {
  434.     fsmGetFSInfoByIndex            = -1,                            /* get fs info by index */
  435.     fsmGetFSInfoByFSID            = 0,                            /* get fs info by FSID */
  436.     fsmGetFSInfoByRefNum        = 1                                /* get fs info by file/vol refnum */
  437. };
  438.  
  439.  
  440. /*
  441.  * InformFSM messages
  442.  */
  443. enum {
  444.     fsmNopMessage                = 0,                            /* nop */
  445.     fsmDrvQElChangedMessage        = 1,                            /* DQE has changed */
  446.     fsmGetFSIconMessage            = 2                                /* Get FFS's disk icon */
  447. };
  448.  
  449.  
  450. /*
  451.  * Messages passed to the fileSystemCommProc
  452.  */
  453. enum {
  454.     ffsNopMessage                = 0,                            /* nop, should always return noErr */
  455.     ffsGetIconMessage            = 1,                            /* return disk icon and mask */
  456.     ffsIDDiskMessage            = 2,                            /* identify the about-to-be-mounted volume */
  457.     ffsLoadMessage                = 3,                            /* load in the FFS */
  458.     ffsUnloadMessage            = 4,                            /* unload the FFS */
  459.     ffsIDVolMountMessage        = 5,                            /* identify a VolMountInfo record */
  460.     ffsInformMessage            = 6,                            /* FFS defined message */
  461.     ffsGetIconInfoMessage        = 7
  462. };
  463.  
  464.  
  465.  
  466. /*
  467.  *    HFS Utility routine records
  468.  */
  469.  
  470. /*
  471.  * record used by UTGetPathComponentName
  472.  */
  473.  
  474. struct ParsePathRec {
  475.     StringPtr                         namePtr;                    /* pathname to parse */
  476.     short                             startOffset;                /* where to start parsing */
  477.     short                             componentLength;            /* the length of the pathname component parsed */
  478.     SignedByte                         moreName;                    /* non-zero if there are more components after this one */
  479.     SignedByte                         foundDelimiter;                /* non-zero if parsing stopped because a colon (:) delimiter was found */
  480. };
  481. typedef struct ParsePathRec                ParsePathRec;
  482. typedef ParsePathRec *                    ParsePathRecPtr;
  483.  
  484. struct WDCBRec {
  485.     VCBPtr                             wdVCBPtr;                    /* Pointer to VCB of this working directory */
  486.     long                             wdDirID;                    /* Directory ID number of this working directory */
  487.     long                             wdCatHint;                    /* Hint for finding this working directory */
  488.     long                             wdProcID;                    /* Process that created this working directory */
  489. };
  490. typedef struct WDCBRec                    WDCBRec;
  491. typedef WDCBRec *                        WDCBRecPtr;
  492.  
  493. struct FCBRec {
  494.     unsigned long                     fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  495.     SignedByte                         fcbFlags;                    /* FCB flags */
  496.     SignedByte                         fcbTypByt;                    /* File type byte */
  497.     unsigned short                     fcbSBlk;                    /* File start block (in alloc size blks) */
  498.     unsigned long                     fcbEOF;                        /* Logical length or EOF in bytes */
  499.     unsigned long                     fcbPLen;                    /* Physical file length in bytes */
  500.     unsigned long                     fcbCrPs;                    /* Current position within file */
  501.     VCBPtr                             fcbVPtr;                    /* Pointer to the corresponding VCB */
  502.     Ptr                             fcbBfAdr;                    /* File's buffer address */
  503.     unsigned short                     fcbFlPos;                    /* Directory block this file is in */
  504.                                                                 /* FCB Extensions for HFS */
  505.     unsigned long                     fcbClmpSize;                /* Number of bytes per clump */
  506.     Ptr                             fcbBTCBPtr;                    /* Pointer to B*-Tree control block for file */
  507.     HFSExtentRecord                 fcbExtRec;                    /* First 3 file extents */
  508.     OSType                             fcbFType;                    /* File's 4 Finder Type bytes */
  509.     unsigned long                     fcbCatPos;                    /* Catalog hint for use on Close */
  510.     unsigned long                     fcbDirID;                    /* Parent Directory ID */
  511.     Str31                             fcbCName;                    /* CName of open file */
  512. };
  513. typedef struct FCBRec                    FCBRec;
  514. typedef FCBRec *                        FCBRecPtr;
  515.  
  516. struct ForkControlBlock {
  517.     unsigned long                     fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  518.     SignedByte                         fcbFlags;                    /* FCB flags */
  519.     SignedByte                         fcbTypByt;                    /* File type byte */
  520.     unsigned short                     fcbSBlk;                    /* File start block (in alloc size blks) */
  521.     unsigned long                     fcbEOF;                        /* Logical length or EOF in bytes */
  522.     unsigned long                     fcbPLen;                    /* Physical file length in bytes */
  523.     unsigned long                     fcbCrPs;                    /* Current position within file */
  524.     VCBPtr                             fcbVPtr;                    /* Pointer to the corresponding VCB */
  525.     Ptr                             fcbBfAdr;                    /* File's buffer address */
  526.     unsigned short                     fcbFlPos;                    /* Directory block this file is in */
  527.                                                                 /* FCB Extensions for HFS */
  528.     unsigned long                     fcbClmpSize;                /* Number of bytes per clump */
  529.     Ptr                             fcbBTCBPtr;                    /* Pointer to B*-Tree control block for file */
  530.     HFSExtentRecord                 fcbExtRec;                    /* First 3 file extents */
  531.     OSType                             fcbFType;                    /* File's 4 Finder Type bytes */
  532.     unsigned long                     fcbCatPos;                    /* Catalog hint for use on Close */
  533.     unsigned long                     fcbDirID;                    /* Parent Directory ID */
  534.     Str31                             fcbCName;                    /* CName of open file */
  535.  
  536.                                                                 /*    New fields start here*/
  537.  
  538.     unsigned short                     moreFlags;                    /* more flags, align following fields*/
  539.  
  540.                                                                 /*    Old ExtendedFCB fields*/
  541.  
  542.     ProcessSerialNumber             processID;                    /* Process Mgr process that opened the file (used to clean up at process death).*/
  543.     HFSPlusExtentRecord             extents;                    /* extents for HFS+ volumes*/
  544.  
  545.                                                                 /*    New fields for HFS Plus APIs*/
  546.  
  547.     UInt64                             endOfFile;                    /* logical size of this fork*/
  548.     UInt64                             physicalEOF;                /* amount of space physically allocated to this fork*/
  549.     UInt64                             currentPosition;            /* default offset for next read/write*/
  550.     UInt32                             forkID;
  551.     Ptr                             searchListPtr;                /* reserved for File Manager's use*/
  552.     UInt8                             reserved1[8];                /* reserved*/
  553. };
  554. typedef struct ForkControlBlock            ForkControlBlock;
  555. typedef ForkControlBlock *                ForkControlBlockPtr;
  556. /*
  557.  *    IteratorControlBlock - a ForkControlBlock used by a FSIterator
  558.  */
  559.  
  560. struct IteratorControlBlock {
  561.     unsigned long                     containerID;                /* directory ID of iterator's container*/
  562.     unsigned short                     flags;                        /* reserved*/
  563.     UInt8                             user1[14];                    /* 14 bytes iterator's use*/
  564.     VCBPtr                             vcbPtr;                        /* pointer to the iterator's VCB*/
  565.     unsigned long                     reserved2;                    /* reserved*/
  566.     UInt8                             user2[6];                    /* 6 bytes for iterator's use*/
  567.     unsigned long                     reserved3;                    /* reserved*/
  568.     UInt8                             user3[12];                    /* 12 bytes for iterator's use*/
  569.     OSType                             cbType;                        /* must be 'fold'*/
  570.     UInt8                             user4[40];                    /* 40 bytes for iterator's use*/
  571.     unsigned short                     moreFlags;                    /* must be fcbIteratorMask*/
  572.     ProcessSerialNumber             processID;                    /* Process Mgr process that opened the iterator (used to clean up at process death).*/
  573.     UInt8                             user5[92];                    /* 92 bytes for iterator's use*/
  574.     Ptr                             searchListPtr;                /* reserved for File Manager's use*/
  575.     UInt8                             reserved1[8];                /* reserved*/
  576. };
  577. typedef struct IteratorControlBlock        IteratorControlBlock;
  578. typedef IteratorControlBlock *            IteratorControlBlockPtr;
  579. /*
  580.  *    HFS Component Interface records
  581.  */
  582. typedef CALLBACK_API( OSErr , Lg2PhysProcPtr )(void *fsdGlobalPtr, VCBPtr volCtrlBlockPtr, FCBRecPtr fileCtrlBlockPtr, short fileRefNum, unsigned long filePosition, unsigned long reqCount, unsigned long *volOffset, unsigned long *contiguousBytes);
  583. typedef STACK_UPP_TYPE(Lg2PhysProcPtr)                             Lg2PhysUPP;
  584. #if OPAQUE_UPP_TYPES
  585.     EXTERN_API(Lg2PhysUPP)
  586.     NewLg2PhysUPP                   (Lg2PhysProcPtr            userRoutine);
  587.  
  588.     EXTERN_API(void)
  589.     DisposeLg2PhysUPP               (Lg2PhysUPP                userUPP);
  590.  
  591.     EXTERN_API(OSErr)
  592.     InvokeLg2PhysUPP               (void *                    fsdGlobalPtr,
  593.                                     VCBPtr                    volCtrlBlockPtr,
  594.                                     FCBRecPtr                fileCtrlBlockPtr,
  595.                                     short                    fileRefNum,
  596.                                     unsigned long            filePosition,
  597.                                     unsigned long            reqCount,
  598.                                     unsigned long *            volOffset,
  599.                                     unsigned long *            contiguousBytes,
  600.                                     Lg2PhysUPP                userUPP);
  601.  
  602. #else
  603.     enum { uppLg2PhysProcInfo = 0x003FEFE0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  604.     #define NewLg2PhysUPP(userRoutine)                                 (Lg2PhysUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppLg2PhysProcInfo, GetCurrentArchitecture())
  605.     #define DisposeLg2PhysUPP(userUPP)                                 DisposeRoutineDescriptor(userUPP)
  606.     #define InvokeLg2PhysUPP(fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes, userUPP)  (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppLg2PhysProcInfo, (fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  607. #endif
  608. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  609. #define NewLg2PhysProc(userRoutine)                             NewLg2PhysUPP(userRoutine)
  610. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes) InvokeLg2PhysUPP(fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes, userRoutine)
  611. typedef CALLBACK_API( OSErr , HFSCIProcPtr )(VCBPtr theVCB, short selectCode, void *paramBlock, void *fsdGlobalPtr, short fsid);
  612. typedef STACK_UPP_TYPE(HFSCIProcPtr)                             HFSCIUPP;
  613. #if OPAQUE_UPP_TYPES
  614.     EXTERN_API(HFSCIUPP)
  615.     NewHFSCIUPP                       (HFSCIProcPtr            userRoutine);
  616.  
  617.     EXTERN_API(void)
  618.     DisposeHFSCIUPP                   (HFSCIUPP                userUPP);
  619.  
  620.     EXTERN_API(OSErr)
  621.     InvokeHFSCIUPP                   (VCBPtr                    theVCB,
  622.                                     short                    selectCode,
  623.                                     void *                    paramBlock,
  624.                                     void *                    fsdGlobalPtr,
  625.                                     short                    fsid,
  626.                                     HFSCIUPP                userUPP);
  627.  
  628. #else
  629.     enum { uppHFSCIProcInfo = 0x0000BEE0 };                         /* pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes) */
  630.     #define NewHFSCIUPP(userRoutine)                                 (HFSCIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHFSCIProcInfo, GetCurrentArchitecture())
  631.     #define DisposeHFSCIUPP(userUPP)                                 DisposeRoutineDescriptor(userUPP)
  632.     #define InvokeHFSCIUPP(theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppHFSCIProcInfo, (theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  633. #endif
  634. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  635. #define NewHFSCIProc(userRoutine)                                 NewHFSCIUPP(userRoutine)
  636. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid) InvokeHFSCIUPP(theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid, userRoutine)
  637.  
  638. struct HFSCIRec {
  639.     long                             compInterfMask;                /* component flags */
  640.     HFSCIUPP                         compInterfProc;                /* pointer to file system call processing code */
  641.     Lg2PhysUPP                         log2PhyProc;                /* pointer to Lg2PhysProc() code */
  642.     Ptr                             stackTop;                    /* file system stack top */
  643.     long                             stackSize;                    /* file system stack size */
  644.     Ptr                             stackPtr;                    /* current file system stack pointer */
  645.     long                             reserved3;                    /* --reserved, must be zero-- */
  646.     long                             idSector;                    /* Sector you need to ID a local volume. For networked volumes, this must be -1 */
  647.     long                             reserved2;                    /* --reserved, must be zero-- */
  648.     long                             reserved1;                    /* --reserved, must be zero-- */
  649. };
  650. typedef struct HFSCIRec                    HFSCIRec;
  651. typedef HFSCIRec *                        HFSCIRecPtr;
  652. /*
  653.  *    Disk Initialization Component Interface records
  654.  */
  655. typedef CALLBACK_API( OSErr , DICIProcPtr )(short whatFunction, void *paramBlock, void *fsdGlobalPtr);
  656. typedef STACK_UPP_TYPE(DICIProcPtr)                             DICIUPP;
  657. #if OPAQUE_UPP_TYPES
  658.     EXTERN_API(DICIUPP)
  659.     NewDICIUPP                       (DICIProcPtr                userRoutine);
  660.  
  661.     EXTERN_API(void)
  662.     DisposeDICIUPP                   (DICIUPP                    userUPP);
  663.  
  664.     EXTERN_API(OSErr)
  665.     InvokeDICIUPP                   (short                    whatFunction,
  666.                                     void *                    paramBlock,
  667.                                     void *                    fsdGlobalPtr,
  668.                                     DICIUPP                    userUPP);
  669.  
  670. #else
  671.     enum { uppDICIProcInfo = 0x00000FA0 };                             /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
  672.     #define NewDICIUPP(userRoutine)                                 (DICIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDICIProcInfo, GetCurrentArchitecture())
  673.     #define DisposeDICIUPP(userUPP)                                 DisposeRoutineDescriptor(userUPP)
  674.     #define InvokeDICIUPP(whatFunction, paramBlock, fsdGlobalPtr, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDICIProcInfo, (whatFunction), (paramBlock), (fsdGlobalPtr))
  675. #endif
  676. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  677. #define NewDICIProc(userRoutine)                                 NewDICIUPP(userRoutine)
  678. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr) InvokeDICIUPP(whatFunction, paramBlock, fsdGlobalPtr, userRoutine)
  679.  
  680. struct DICIRec {
  681.     long                             compInterfMask;                /* component flags */
  682.     DICIUPP                         compInterfProc;                /* pointer to call processing code */
  683.     short                             maxVolNameLength;            /* maximum length of your volume name */
  684.     unsigned short                     blockSize;                    /* your file system's block size */
  685.     long                             reserved3;                    /* --reserved, must be zero-- */
  686.     long                             reserved2;                    /* --reserved, must be zero-- */
  687.     long                             reserved1;                    /* --reserved, must be zero-- */
  688. };
  689. typedef struct DICIRec                    DICIRec;
  690. typedef DICIRec *                        DICIRecPtr;
  691. /*
  692.  * FormatListRec as returned by the .Sony disk driver's
  693.  * Return Format List status call (csCode = 6).
  694.  * If the status call to get this list for a drive is not
  695.  * implemented by the driver, then a list with one entry
  696.  * is contructed from the drive queue element for the drive.
  697.  */
  698.  
  699. struct FormatListRec {
  700.     unsigned long                     volSize;                    /* disk capacity in SECTORs */
  701.     SignedByte                         formatFlags;                /* flags */
  702.     SignedByte                         sectorsPerTrack;            /* sectors per track side */
  703.     unsigned short                     tracks;                        /* number of tracks */
  704. };
  705. typedef struct FormatListRec            FormatListRec;
  706. typedef FormatListRec *                    FormatListRecPtr;
  707. /*
  708.  * SizeListRec built from FormatListRecs as described above.
  709.  */
  710.  
  711. struct SizeListRec {
  712.     short                             sizeListFlags;                /* flags as set by external file system */
  713.     FormatListRec                     sizeEntry;                    /* disk driver format list record */
  714. };
  715. typedef struct SizeListRec                SizeListRec;
  716. typedef SizeListRec *                    SizeListRecPtr;
  717. /*
  718.  * paramBlock for the diCIEvaluateSize call
  719.  */
  720.  
  721. struct DICIEvaluateSizeRec {
  722.     short                             defaultSizeIndex;            /* default size for this FS */
  723.     short                             numSizeEntries;                /* number of size entries */
  724.     short                             driveNumber;                /* drive number */
  725.     SizeListRecPtr                     sizeListPtr;                /* ptr to size entry table */
  726.     unsigned short                     sectorSize;                    /* bytes per sector */
  727. };
  728. typedef struct DICIEvaluateSizeRec        DICIEvaluateSizeRec;
  729. typedef DICIEvaluateSizeRec *            DICIEvaluateSizeRecPtr;
  730. /*
  731.  * paramBlock for the diCIExtendedZero call
  732.  */
  733.  
  734. struct DICIExtendedZeroRec {
  735.     short                             driveNumber;                /* drive number */
  736.     StringPtr                         volNamePtr;                    /* ptr to volume name string */
  737.     short                             fsid;                        /* file system ID */
  738.     short                             volTypeSelector;            /* volume type selector, if supports more than 1 type */
  739.     unsigned short                     numDefectBlocks;            /* number of bad logical blocks */
  740.     unsigned short                     defectListSize;                /* size of the defect list buffer in bytes */
  741.     Ptr                             defectListPtr;                /* pointer to defect list buffer */
  742.     unsigned long                     volSize;                    /* size of volume in SECTORs */
  743.     unsigned short                     sectorSize;                    /* bytes per sector */
  744.     Ptr                             extendedInfoPtr;            /* ptr to extended info */
  745. };
  746. typedef struct DICIExtendedZeroRec        DICIExtendedZeroRec;
  747. typedef DICIExtendedZeroRec *            DICIExtendedZeroRecPtr;
  748. /*
  749.  * paramBlock for the diCIValidateVolName call
  750.  */
  751.  
  752. struct DICIValidateVolNameRec {
  753.     char                             theChar;                    /* the character to validate */
  754.     Boolean                         hasMessageBuffer;            /* false if no message */
  755.     short                             charOffset;                    /* position of the current character (first char = 1) */
  756.     StringPtr                         messageBufferPtr;            /* pointer to message buffer or nil */
  757.     short                             charByteType;                /* theChar's byte type (smSingleByte, smFirstByte, or smLastByte) */
  758. };
  759. typedef struct DICIValidateVolNameRec    DICIValidateVolNameRec;
  760. typedef DICIValidateVolNameRec *        DICIValidateVolNameRecPtr;
  761. /*
  762.  * paramBlock for the diCIGetVolTypeInfo call
  763.  */
  764.  
  765. struct DICIGetVolTypeInfoRec {
  766.     unsigned long                     volSize;                    /* size of volume in SECTORs */
  767.     unsigned short                     sectorSize;                    /* bytes per sector */
  768.     short                             numVolTypes;                /* number of volume types supported */
  769.     Str31                             volTypesBuffer[4];            /* 4 string buffers */
  770. };
  771. typedef struct DICIGetVolTypeInfoRec    DICIGetVolTypeInfoRec;
  772. typedef DICIGetVolTypeInfoRec *            DICIGetVolTypeInfoRecPtr;
  773. /*
  774.  * paramBlock for the diCIGetFormatString call
  775.  */
  776.  
  777. struct DICIGetFormatStringRec {
  778.     unsigned long                     volSize;                    /* volume size in SECTORs */
  779.     unsigned short                     sectorSize;                    /* sector size */
  780.     short                             volTypeSelector;            /* volume type selector */
  781.     short                             stringKind;                    /* sub-function = type of string */
  782.     Str255                             stringBuffer;                /* string buffer */
  783. };
  784. typedef struct DICIGetFormatStringRec    DICIGetFormatStringRec;
  785. typedef DICIGetFormatStringRec *        DICIGetFormatStringRecPtr;
  786. /*
  787.  * paramBlock for the diCIGetExtendedFormatParams call
  788.  */
  789.  
  790. struct DICIGetExtendedFormatRec {
  791.     short                             driveNumber;                /* drive number */
  792.     short                             volTypeSelector;            /* volume type selector or 0 */
  793.     unsigned long                     volSize;                    /* size of volume in SECTORs */
  794.     unsigned short                     sectorSize;                    /* bytes per sector */
  795.     FSSpecPtr                         fileSystemSpecPtr;            /* pointer to the foreign file system's FSSpec */
  796.     Ptr                             extendedInfoPtr;            /* pointer to extended parameter structure */
  797. };
  798. typedef struct DICIGetExtendedFormatRec    DICIGetExtendedFormatRec;
  799. typedef DICIGetExtendedFormatRec *        DICIGetExtendedFormatRecPtr;
  800. /*
  801.  *    File System Manager records
  802.  */
  803.  
  804. typedef CALLBACK_API( OSErr , FSDCommProcPtr )(short message, void *paramBlock, void *globalsPtr);
  805. typedef STACK_UPP_TYPE(FSDCommProcPtr)                             FSDCommUPP;
  806. #if OPAQUE_UPP_TYPES
  807.     EXTERN_API(FSDCommUPP)
  808.     NewFSDCommUPP                   (FSDCommProcPtr            userRoutine);
  809.  
  810.     EXTERN_API(void)
  811.     DisposeFSDCommUPP               (FSDCommUPP                userUPP);
  812.  
  813.     EXTERN_API(OSErr)
  814.     InvokeFSDCommUPP               (short                    message,
  815.                                     void *                    paramBlock,
  816.                                     void *                    globalsPtr,
  817.                                     FSDCommUPP                userUPP);
  818.  
  819. #else
  820.     enum { uppFSDCommProcInfo = 0x00000FA0 };                         /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
  821.     #define NewFSDCommUPP(userRoutine)                                 (FSDCommUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFSDCommProcInfo, GetCurrentArchitecture())
  822.     #define DisposeFSDCommUPP(userUPP)                                 DisposeRoutineDescriptor(userUPP)
  823.     #define InvokeFSDCommUPP(message, paramBlock, globalsPtr, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppFSDCommProcInfo, (message), (paramBlock), (globalsPtr))
  824. #endif
  825. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  826. #define NewFSDCommProc(userRoutine)                             NewFSDCommUPP(userRoutine)
  827. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr) InvokeFSDCommUPP(message, paramBlock, globalsPtr, userRoutine)
  828. typedef struct FSDRec                     FSDRec;
  829.  
  830. struct FSDRec {
  831.     struct FSDRec *                    fsdLink;                    /* ptr to next */
  832.     short                             fsdLength;                    /* length of this FSD in BYTES */
  833.     short                             fsdVersion;                    /* version number */
  834.     short                             fileSystemFSID;                /* file system id */
  835.     Str31                             fileSystemName;                /* file system name */
  836.     FSSpec                             fileSystemSpec;                /* foreign file system's FSSpec */
  837.     Ptr                             fileSystemGlobalsPtr;        /* ptr to file system globals */
  838.     FSDCommUPP                         fileSystemCommProc;            /* communication proc with the FFS */
  839.     long                             reserved3;                    /* --reserved, must be zero-- */
  840.     long                             reserved2;                    /* --reserved, must be zero-- */
  841.     long                             reserved1;                    /* --reserved, must be zero-- */
  842.     HFSCIRec                         fsdHFSCI;                    /* HFS component interface    */
  843.     DICIRec                         fsdDICI;                    /* Disk Initialization component interface */
  844. };
  845.  
  846.  
  847. typedef FSDRec *                        FSDRecPtr;
  848.  
  849. struct FSMGetIconInfoRec {
  850.     long                             theIcon[32];                /* The ICN# structure */
  851.     long                             theMask[32];                /* The mask for the icon above */
  852.     Str255                             whereStr;
  853. };
  854. typedef struct FSMGetIconInfoRec        FSMGetIconInfoRec;
  855. typedef FSMGetIconInfoRec *                FSMGetIconInfoRecPtr;
  856. /*
  857.  * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  858.  */
  859.  
  860. struct FSMGetIconRec {
  861.     short                             refNum;                        /* target drive num or volume refnum */
  862.     FSMGetIconInfoRecPtr             iconBufferPtr;                /* pointer to icon buffer */
  863.     long                             requestSize;                /* requested size of the icon buffer */
  864.     long                             actualSize;                    /* actual size of the icon data returned */
  865.     SInt8                             iconType;                    /* kind of icon */
  866.     Boolean                         isEjectable;                /* true if the device is ejectable */
  867.     DrvQElPtr                         driveQElemPtr;                /* pointer to DQE */
  868.     FSSpecPtr                         fileSystemSpecPtr;            /* pointer to foreign file system's FSSpec */
  869.     long                             reserved1;                    /* --reserved, must be zero-- */
  870. };
  871. typedef struct FSMGetIconRec            FSMGetIconRec;
  872. typedef FSMGetIconRec *                    FSMGetIconRecPtr;
  873. #if CALL_NOT_IN_CARBON
  874. /*
  875.  *    HFS Utility routine prototypes
  876.  */
  877. EXTERN_API( OSErr )
  878. UTAllocateFCB                    (short *                fileRefNum,
  879.                                  FCBRecPtr *            fileCtrlBlockPtr)                    TWOWORDINLINE(0x7000, 0xA824);
  880.  
  881. EXTERN_API( OSErr )
  882. UTReleaseFCB                    (short                     fileRefNum)                            TWOWORDINLINE(0x7001, 0xA824);
  883.  
  884. EXTERN_API( OSErr )
  885. UTLocateFCB                        (VCBPtr                 volCtrlBlockPtr,
  886.                                  unsigned long             fileNum,
  887.                                  StringPtr                 namePtr,
  888.                                  short *                fileRefNum,
  889.                                  FCBRecPtr *            fileCtrlBlockPtr)                    TWOWORDINLINE(0x7002, 0xA824);
  890.  
  891. EXTERN_API( OSErr )
  892. UTLocateNextFCB                    (VCBPtr                 volCtrlBlockPtr,
  893.                                  unsigned long             fileNum,
  894.                                  StringPtr                 namePtr,
  895.                                  short *                fileRefNum,
  896.                                  FCBRecPtr *            fileCtrlBlockPtr)                    TWOWORDINLINE(0x7003, 0xA824);
  897.  
  898. EXTERN_API( OSErr )
  899. UTIndexFCB                        (VCBPtr                 volCtrlBlockPtr,
  900.                                  short *                fileRefNum,
  901.                                  FCBRecPtr *            fileCtrlBlockPtr)                    TWOWORDINLINE(0x7004, 0xA824);
  902.  
  903. EXTERN_API( OSErr )
  904. UTResolveFCB                    (short                     fileRefNum,
  905.                                  FCBRecPtr *            fileCtrlBlockPtr)                    TWOWORDINLINE(0x7005, 0xA824);
  906.  
  907. EXTERN_API( OSErr )
  908. UTAllocateVCB                    (unsigned short *        sysVCBLength,
  909.                                  VCBPtr *                volCtrlBlockPtr,
  910.                                  unsigned short         addSize)                            TWOWORDINLINE(0x7006, 0xA824);
  911.  
  912. EXTERN_API( OSErr )
  913. UTAddNewVCB                        (short                     driveNum,
  914.                                  short *                vRefNum,
  915.                                  VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x7007, 0xA824);
  916.  
  917. EXTERN_API( OSErr )
  918. UTDisposeVCB                    (VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x7008, 0xA824);
  919.  
  920. EXTERN_API( OSErr )
  921. UTLocateVCBByRefNum                (short                     refNum,
  922.                                  short *                vRefNum,
  923.                                  VCBPtr *                volCtrlBlockPtr)                    TWOWORDINLINE(0x7009, 0xA824);
  924.  
  925. EXTERN_API( OSErr )
  926. UTLocateVCBByName                (StringPtr                 namePtr,
  927.                                  short *                moreMatches,
  928.                                  short *                vRefNum,
  929.                                  VCBPtr *                volCtrlBlockPtr)                    TWOWORDINLINE(0x700A, 0xA824);
  930.  
  931. EXTERN_API( OSErr )
  932. UTLocateNextVCB                    (StringPtr                 namePtr,
  933.                                  short *                moreMatches,
  934.                                  short *                vRefNum,
  935.                                  VCBPtr *                volCtrlBlockPtr)                    TWOWORDINLINE(0x700B, 0xA824);
  936.  
  937. EXTERN_API( OSErr )
  938. UTAllocateWDCB                    (WDPBPtr                 paramBlock)                            TWOWORDINLINE(0x700C, 0xA824);
  939.  
  940. EXTERN_API( OSErr )
  941. UTReleaseWDCB                    (short                     wdRefNum)                            TWOWORDINLINE(0x700D, 0xA824);
  942.  
  943. EXTERN_API( OSErr )
  944. UTResolveWDCB                    (long                     procID,
  945.                                  short                     wdIndex,
  946.                                  short                     wdRefNum,
  947.                                  WDCBRecPtr *            wdCtrlBlockPtr)                        TWOWORDINLINE(0x700E, 0xA824);
  948.  
  949. EXTERN_API( OSErr )
  950. UTFindDrive                        (short                     driveNum,
  951.                                  DrvQElPtr *            driveQElementPtr)                    TWOWORDINLINE(0x700F, 0xA824);
  952.  
  953. EXTERN_API( OSErr )
  954. UTAdjustEOF                        (short                     fileRefNum)                            TWOWORDINLINE(0x7010, 0xA824);
  955.  
  956. EXTERN_API( OSErr )
  957. UTSetDefaultVol                    (long                     nodeHint,
  958.                                  unsigned long             dirID,
  959.                                  short                     refNum)                                TWOWORDINLINE(0x7011, 0xA824);
  960.  
  961. EXTERN_API( OSErr )
  962. UTGetDefaultVol                    (WDPBPtr                 paramBlock)                            TWOWORDINLINE(0x7012, 0xA824);
  963.  
  964. EXTERN_API( OSErr )
  965. UTEjectVol                        (VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x702B, 0xA824);
  966.  
  967. EXTERN_API( OSErr )
  968. UTCheckWDRefNum                    (short                     wdRefNum)                            TWOWORDINLINE(0x7013, 0xA824);
  969.  
  970. EXTERN_API( OSErr )
  971. UTCheckFileRefNum                (short                     fileRefNum)                            TWOWORDINLINE(0x7014, 0xA824);
  972.  
  973. EXTERN_API( OSErr )
  974. UTCheckVolRefNum                (short                     vRefNum)                            TWOWORDINLINE(0x7015, 0xA824);
  975.  
  976. EXTERN_API( OSErr )
  977. UTCheckPermission                (VCBPtr                 volCtrlBlockPtr,
  978.                                  short *                modByte,
  979.                                  unsigned long             fileNum,
  980.                                  ParmBlkPtr             paramBlock)                            TWOWORDINLINE(0x7016, 0xA824);
  981.  
  982. EXTERN_API( OSErr )
  983. UTCheckVolOffline                (short                     vRefNum)                            TWOWORDINLINE(0x7017, 0xA824);
  984.  
  985. EXTERN_API( OSErr )
  986. UTCheckVolModifiable            (short                     vRefNum)                            TWOWORDINLINE(0x7018, 0xA824);
  987.  
  988. EXTERN_API( OSErr )
  989. UTCheckFileModifiable            (short                     fileRefNum)                            TWOWORDINLINE(0x7019, 0xA824);
  990.  
  991. EXTERN_API( OSErr )
  992. UTCheckDirBusy                    (VCBPtr                 volCtrlBlockPtr,
  993.                                  unsigned long             dirID)                                TWOWORDINLINE(0x701A, 0xA824);
  994.  
  995. EXTERN_API( OSErr )
  996. UTParsePathname                    (short *                volNamelength,
  997.                                  StringPtr                 namePtr)                            TWOWORDINLINE(0x701B, 0xA824);
  998.  
  999. EXTERN_API( OSErr )
  1000. UTGetPathComponentName            (ParsePathRecPtr         parseRec)                            TWOWORDINLINE(0x701C, 0xA824);
  1001.  
  1002. EXTERN_API( OSErr )
  1003. UTDetermineVol                    (ParmBlkPtr             paramBlock,
  1004.                                  short *                status,
  1005.                                  short *                moreMatches,
  1006.                                  short *                vRefNum,
  1007.                                  VCBPtr *                volCtrlBlockPtr)                    TWOWORDINLINE(0x701D, 0xA824);
  1008.  
  1009. EXTERN_API( OSErr )
  1010. UTGetBlock                        (short                     refNum,
  1011.                                  void *                    log2PhyProc,
  1012.                                  unsigned long             blockNum,
  1013.                                  short                     gbOption,
  1014.                                  Ptr *                    buffer)                                TWOWORDINLINE(0x701F, 0xA824);
  1015.  
  1016. EXTERN_API( OSErr )
  1017. UTReleaseBlock                    (Ptr                     buffer,
  1018.                                  short                     rbOption)                            TWOWORDINLINE(0x7020, 0xA824);
  1019.  
  1020. EXTERN_API( OSErr )
  1021. UTFlushCache                    (short                     refNum,
  1022.                                  short                     fcOption)                            TWOWORDINLINE(0x7021, 0xA824);
  1023.  
  1024. EXTERN_API( OSErr )
  1025. UTMarkDirty                        (Ptr                     buffer)                                TWOWORDINLINE(0x7023, 0xA824);
  1026.  
  1027. EXTERN_API( OSErr )
  1028. UTTrashVolBlocks                (VCBPtr                 volCtrlBlockPtr)                    TWOWORDINLINE(0x7024, 0xA824);
  1029.  
  1030. EXTERN_API( OSErr )
  1031. UTTrashFileBlocks                (VCBPtr                 volCtrlBlockPtr,
  1032.                                  unsigned long             fileNum)                            TWOWORDINLINE(0x7025, 0xA824);
  1033.  
  1034. EXTERN_API( OSErr )
  1035. UTTrashBlocks                    (unsigned long             beginPosition,
  1036.                                  unsigned long             byteCount,
  1037.                                  VCBPtr                 volCtrlBlockPtr,
  1038.                                  short                     fileRefNum,
  1039.                                  short                     tbOption)                            TWOWORDINLINE(0x7026, 0xA824);
  1040.  
  1041. EXTERN_API( OSErr )
  1042. UTCacheReadIP                    (void *                    log2PhyProc,
  1043.                                  unsigned long             filePosition,
  1044.                                  Ptr                     ioBuffer,
  1045.                                  short                     fileRefNum,
  1046.                                  unsigned long             reqCount,
  1047.                                  unsigned long *        actCount,
  1048.                                  short                     cacheOption)                        TWOWORDINLINE(0x7027, 0xA824);
  1049.  
  1050. EXTERN_API( OSErr )
  1051. UTCacheWriteIP                    (void *                    log2PhyProc,
  1052.                                  unsigned long             filePosition,
  1053.                                  Ptr                     ioBuffer,
  1054.                                  short                     fileRefNum,
  1055.                                  unsigned long             reqCount,
  1056.                                  unsigned long *        actCount,
  1057.                                  short                     cacheOption)                        TWOWORDINLINE(0x7028, 0xA824);
  1058.  
  1059. EXTERN_API( OSErr )
  1060. UTBlockInFQHashP                (short                     vRefNum,
  1061.                                  unsigned long             diskBlock)                            TWOWORDINLINE(0x702C, 0xA824);
  1062.  
  1063. EXTERN_API( OSErr )
  1064. UTVolCacheReadIP                (VCBPtr                 volCtrlBlockPtr,
  1065.                                  unsigned long             blockPosition,
  1066.                                  Ptr                     ioBuffer,
  1067.                                  unsigned long             reqCount,
  1068.                                  unsigned long *        actCount,
  1069.                                  short                     cacheOption)                        TWOWORDINLINE(0x7034, 0xA824);
  1070.  
  1071. EXTERN_API( OSErr )
  1072. UTVolCacheWriteIP                (VCBPtr                 volCtrlBlockPtr,
  1073.                                  unsigned long             blockPosition,
  1074.                                  Ptr                     ioBuffer,
  1075.                                  unsigned long             reqCount,
  1076.                                  unsigned long *        actCount,
  1077.                                  short                     cacheOption)                        TWOWORDINLINE(0x7035, 0xA824);
  1078.  
  1079. EXTERN_API( OSErr )
  1080. UTResolveFileRefNum                (FCBRecPtr                 fileCtrlBlockPtr,
  1081.                                  short *                fileRefNum)                            TWOWORDINLINE(0x7036, 0xA824);
  1082.  
  1083. EXTERN_API( OSErr )
  1084. UTCheckFCB                        (FCBRecPtr                 fileCtrlBlockPtr)                    TWOWORDINLINE(0x7037, 0xA824);
  1085.  
  1086. EXTERN_API( OSErr )
  1087. UTCheckForkPermissions            (VCBPtr                 volCtrlBlockPtr,
  1088.                                  UInt32                 fileNum,
  1089.                                  UInt32                 forkID,
  1090.                                  Boolean                 fileLocked,
  1091.                                  SInt8                     permissions,
  1092.                                  Boolean                 useSearchList,
  1093.                                  SInt8 *                fcbFlags,
  1094.                                  SInt16 *                openForkRefNum)                        TWOWORDINLINE(0x7038, 0xA824);
  1095.  
  1096. EXTERN_API( OSErr )
  1097. UTAddFCBToSearchList            (FCBRecPtr                 fileCtrlBlockPtr)                    TWOWORDINLINE(0x7039, 0xA824);
  1098.  
  1099. EXTERN_API( OSErr )
  1100. UTRemoveFCBFromSearchList        (FCBRecPtr                 fileCtrlBlockPtr)                    TWOWORDINLINE(0x703A, 0xA824);
  1101.  
  1102. EXTERN_API( OSErr )
  1103. UTLocateFCBInSearchList            (VCBPtr                 volCtrlBlockPtr,
  1104.                                  unsigned long             fileNum,
  1105.                                  short *                fileRefNum,
  1106.                                  FCBRecPtr *            fileCtrlBlockPtr)                    TWOWORDINLINE(0x703B, 0xA824);
  1107.  
  1108. EXTERN_API( OSErr )
  1109. UTGetForkControlBlockSize        (UInt32 *                fcbSize)                            TWOWORDINLINE(0x703C, 0xA824);
  1110.  
  1111.  
  1112. /*
  1113.  *    File System Manager call prototypes
  1114.  */
  1115.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1116.                                                                                             #pragma parameter __D0 InstallFS(__A0)
  1117.                                                                                             #endif
  1118. EXTERN_API( OSErr )
  1119. InstallFS                        (FSDRecPtr                 fsdPtr)                                TWOWORDINLINE(0x7000, 0xA0AC);
  1120.  
  1121.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1122.                                                                                             #pragma parameter __D0 RemoveFS(__A0)
  1123.                                                                                             #endif
  1124. EXTERN_API( OSErr )
  1125. RemoveFS                        (short                     fsid)                                TWOWORDINLINE(0x7001, 0xA0AC);
  1126.  
  1127. EXTERN_API( OSErr )
  1128. SetFSInfo                        (short                     fsid,
  1129.                                  short                     bufSize,
  1130.                                  FSDRecPtr                 fsdPtr);
  1131.  
  1132. EXTERN_API( OSErr )
  1133. GetFSInfo                        (short                     selector,
  1134.                                  short                     key,
  1135.                                  short *                bufSize,
  1136.                                  FSDRecPtr                 fsdPtr);
  1137.  
  1138. EXTERN_API( OSErr )
  1139. InformFSM                        (short                     theMessage,
  1140.                                  void *                    paramBlock);
  1141.  
  1142. EXTERN_API( OSErr )
  1143. InformFFS                        (short                     fsid,
  1144.                                  void *                    paramBlock);
  1145.  
  1146. #endif  /* CALL_NOT_IN_CARBON */
  1147.  
  1148.  
  1149. #if PRAGMA_STRUCT_ALIGN
  1150.     #pragma options align=reset
  1151. #elif PRAGMA_STRUCT_PACKPUSH
  1152.     #pragma pack(pop)
  1153. #elif PRAGMA_STRUCT_PACK
  1154.     #pragma pack()
  1155. #endif
  1156.  
  1157. #ifdef PRAGMA_IMPORT_OFF
  1158. #pragma import off
  1159. #elif PRAGMA_IMPORT
  1160. #pragma import reset
  1161. #endif
  1162.  
  1163. #ifdef __cplusplus
  1164. }
  1165. #endif
  1166.  
  1167. #endif /* __FSM__ */
  1168.  
  1169.